version: '3'

services:
  mysql:
    container_name: mysql  # задаем имя контейнера
    image: mysql:latest
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: pass
      MYSQL_DATABASE: x_ray_schedule
    ports:
      - "3306:3306"
    volumes:
      - ./mysql_data:/var/lib/mysql

  phpmyadmin:
    container_name: phpmyadmin  # задаем имя контейнера
    image: phpmyadmin/phpmyadmin:latest
    restart: always
    ports:
      - "8080:80"
    environment:
      PMA_HOST: mysql
      MYSQL_ROOT_PASSWORD: pass